package com.jackchan.homework.sysw.repository;

import com.jackchan.homework.sysw.entity.Material;
import com.jackchan.homework.sysw.entity.Product;
import com.jackchan.homework.sysw.entity.Stock;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * Created by ch-hui on 15/12/24.
 */
public interface StockDao extends
        PagingAndSortingRepository<Stock, Long>,
        JpaSpecificationExecutor<Stock> {

    Stock findByMaterial(Material material);

    Stock findByProduct(Product product);
}
